
from flask import Blueprint,request,jsonify
from db import db1

bp_record=Blueprint('record',__name__)
@bp_record.route('/cateM')
def cateM():
    sql="select * from yptype"
    res=db1.find(sql)
    return jsonify({'list':res})

# @bp_record.route('/record',methods=['GET'])
# def record():
#     id=request.args.get('id')
#     if id:
#         sql="select * from record where id=%d"%(int(id))
#     else:
#         sql="select * from record"
#     res=db1.find(sql)
#     return jsonify({'data':res,'code':200})




